// 需要登陆权限的路由
export const loginPowerRoute = [
  "/about",
  "/classify/recreation"
]

// 是否需要登陆权限
export const hasLoginPower = (path) => {
  if(!loginPowerRoute.length) return false
  const has = loginPowerRoute.some((item) => {
    const roureReg = new RegExp(`^${item}(/)?$`)
    return roureReg.test(path)
  })
  return has
}


// 是否需要权限
export const hasPower = (path, type = "login") => {
  switch(type) {
    case "login":
      return hasLoginPower(path)
  }
}
